package com.zyh.thread.demo3;

/**
 * @Author zyh
 * @Date 2024/8/8 11:31
 * @Description 死锁的演示
 */

public class ThreadDemo3 {
    public static final Object obj1=new Object();
    public static final Object obj2=new Object();
    public static void main(String[] args) {
        //创建两个任务对象
        MyTask01 myTask01 = new MyTask01(obj1,obj2);
        MyTask02 myTask02 = new MyTask02(obj1, obj2);
        //开启两个线程
        new Thread(myTask01).start();
        new Thread(myTask02).start();
    }
}
